from pyspark.sql import SparkSession

spark = SparkSession.builder
        .appName("HiveTableRead")
        .enableHiveSupport()
        .getOrCreate()

        df = spark.table("house.king_county_house")

        df.show()

        df.printSchema()

        df.select("bedrooms_num", "bathroom_num", "selling_price").show()

        df.groupBy("bedrooms_num").count().orderBy("bedrooms_num").show()